#include<stdio.h>
int main()
{
	int A,B,i,sum=0;
	scanf("%d%d",&A,&B);
	for(i=0;i<=B-A;i++)
	{
		sum+=A+i;	
		printf("%5d",A+i);
		if((i+1)%5==0)
		printf("\n");
	}
	if((B-A+1)%5!=0)
	  	printf("\n");
	printf("Sum = %d\n",sum);
	return 0;
}